﻿extends layout

block content
	script(src='/socket.io/socket.io.js')
	script
		var count = 0;
		$(document).ready(function(){
			var socket = io.connect();
			socket.emit('join',["ddd"]);
			socket.on('message', function(data){
				var output=data.textdata;
				$('#content2').html(output);
			});
			$('#typezone').keyup(function(){
				count++;
				if(count>4){
					count=0;
					socket.emit('message',{textdata: $('#typezone').val().replace(/\n/g,"<br>")});
				}
			});
		});
		var textareaHTML = "<textarea onKeyUp(function(){";
	div.span12 N O T E
		div.row
			form(method='post', action='/note')
				div.row
					div.span6
						input(type='text', name = 'title')
						br
						textarea#typezone( cols="200", rows='10')
					div.span6#typeresult(align='left')
						table(border=1)
							- for (var num = 0; num < 10 ; num ++) {
								tr(id='row'+num)
									td(id='lock'+num)
										input(type='checkbox')
									td(id='linenum'+num, width=40, align='right') #{num}
									td(id='content'+num, width=700) 
							- }